package com.imooc.mall.service;

import com.github.pagehelper.PageInfo;
import com.imooc.mall.model.pojo.Product;
import com.imooc.mall.model.request.AddProductReq;
import com.imooc.mall.model.request.ProductListReq;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @description: 商品Service
* @author  yijiu
* @date
* @version 1.0
*/
@Service
public interface ProductService {

    void add(AddProductReq addProductReq);

    void update(Product updateProduct);

    void delete(Integer id);

    void batchUpdateSellStatus(@RequestParam Integer[] ids, Integer sellStatus);

    PageInfo listForAdmin(Integer pageNum, Integer pageSize);

    Product detail(Integer id);

    //TODO 复习重点 递归调用 查询商品的子类商品
    PageInfo list(ProductListReq productListReq);
}
